package com.zzvcom.persist.model.admin;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.zzvcom.persist.model.IdEntity;

@Entity
@Table(name = "category")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Category extends IdEntity
{
	private String name;

	private int seq;

	private String channelid;
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "channelid",nullable = true, insertable = false, updatable = false)	
	private ProductChannel channel;
	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public int getSeq()
	{
		return seq;
	}

	public void setSeq(int seq)
	{
		this.seq = seq;
	}

	public String getChannelid()
	{
		return channelid;
	}

	public void setChannelid(String channelid)
	{
		this.channelid = channelid;
	}

	public ProductChannel getChannel()
	{
		return channel;
	}

	public void setChannel(ProductChannel channel)
	{
		this.channel = channel;
	}

}
